import Vue from "vue";
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state:{
        timesDisable:true,
        fileDisable: false,
        reviewsDisable:false,
    },
    actions:{
        hideCom(context){
            context.commit('hide')
        },
        showCome(context){
            context.commit('show')
        },
        hideCom1(context){
            context.commit('hide1')
        },
        showCome1(context){
            context.commit('show1')
        },
        hideCom2(context){
            context.commit('hide2')
        },
        showCome2(context){
            context.commit('show2')
        },
    },
    getters:{
        isShow(state){
            return state.timesDisable
        },
        isShow1(state){
            return state.fileDisable
        },
        isShow2(state){
            return state.reviewsDisable
        }
    },
    mutations:{
        show(state){
            state.timesDisable =true
        },
        hide(state){
            state.timesDisable=false
        },
        show1(state){
            state.fileDisable =true
        },
        hide1(state){
            state.fileDisable=false
        },
        show2(state){
            state.reviewsDisable =true
        },
        hide2(state){
            state.reviewsDisable=false
        }
    }

})

